package com.nbjtjc.safe.mapper.sys;

import com.nbjtjc.safe.model.sys.SysPost;
import com.nbjtjc.util.MyMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SysPostMapper extends MyMapper<SysPost> {

    @Select("select * from sys_post where post_name=#{postName}")
    List<SysPost> findByName(@Param("postName") String postName);
    @Select("select * from sys_post where id=#{postId}")
    List<SysPost> findByPostId(@Param("postId") int postId);

    List<SysPost> search(@Param("post") SysPost sysPost);
}